<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>后代选择器</title>
  <style>
    p {
      color: red;
    }

    /* 后代选择器 */
    div p {
      font-size: 50px;
    }

    .box1 .box2 p {
      border: 10px solid #000;
    }

    /* 并列选择器 */
    div,
    p {
      font-size: 30px;
    }
  </style>
</head>

<body>
  <p>我是外边的p标签1</p>
  <div>
    <p>我是内部的p标签</p>
  </div>
  <p>我是外边的p标签2</p>
  <div class="box1">
    <div class="box2">
      <p>11111</p>
    </div>
    <div>
      <span>2222</span>
    </div>
    <p>33333</p>
  </div>
</body>

</html>